<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/user/user" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>

  <div class="page">
    <div class="page-hd">
      <h1>{$Think.lang.userManage}</h1>
    </div>
    <div class="navbar">
      <ul class="nav">
        <li <eq name="user_tab" value="cur">class="active"</eq>><a href="{:URL('admin/User/user')}">用户列表</a>
        </li>
        <li <eq name="recycle_tab" value="cur">class="active"</eq>><a href="{:URL('admin/User/user','recycle=1')}">回收站</a>
        </li>
      </ul>
    </div>
    <div class="datas">
      <div class="filterbar">
        <form id="search" action="{:URL('admin/User/user')}" method="get">
          <input id="recycle" class="input-text" name="recycle" type="hidden" value="{$recycle}">
          <label for="is_active">{$Think.lang.status}</label>
          <select name="is_active" id="is_active">
            <option value="" <eq name="is_active" value="">selected</eq>>{$Think.lang.all}</option>
            <option value="1" <eq name="is_active" value="1">selected</eq>>{$Think.lang.active}</option>
            <option value="0" <eq name="is_active" value="0">selected</eq>>{$Think.lang.notActive}</option>
          </select>

          <!--           <label for="sex">{$Think.lang.sex}</label>
          <select name="sex" id="sex">
            <option value="" <eq name="sex" value="">selected</eq>>{$Think.lang.all}</option>
            <option value="1" <eq name="sex" value="1">selected</eq>>{$Think.lang.male}</option>
            <option value="0" <eq name="sex" value="0">selected</eq>>{$Think.lang.female}</option>
          </select> -->

          <label for="">{$Think.lang.userGroupManage}</label>
          <select id="ugroup" name="ugroup">
            <option value="" selected>-</option>
            <volist name="listRole" id="vo">
              <option value="{$vo['id']}" <php>if($ugroup==$vo['id']) echo 'selected';</php>
                >{$vo['name']}
              </option>
            </volist>
          </select>

          <label for="">{$Think.lang.nickname}</label>
          <input type="text" name="nickname" id="nickname" value="{$nickname}" class="input-text">
          <button type="button" class="btn-search" id="J_search" title="{$Think.lang.search}">
            <i class="icon-search"></i>
          </button>

          <a href="javascript:;" class="more" id="J_more">更多查找</a>
          <div class="more-constraints" style="display: none;">
            <label for="">{$Think.lang.uid}</label>
            <input type="number" name="uid" id="uid" value="{$uid}" class="input-text">
            <label for="">{$Think.lang.email}</label>
            <input type="email" name="email" id="email" value="{$email}" class="input-text">
          </div>
        </form>
      </div>

      <div class="datas-bd">
        <table class="table">
          <thead>
            <tr>
              <th style="width: 10px;">
                <input type="checkbox" class="toggle-all" />
              </th>
              <th style="">{$Think.lang.uid}</th>
              <th style="">{$Think.lang.nickname}</th>
              <th style="">{$Think.lang.email}</th>
              <th style="">{$Think.lang.phone}</th>
              <th style="">{$Think.lang.belongsUserManageGroup}</th>
                <th style="">用户等级</th>
              <th style="">{$Think.lang.ctime}</th>
              <th style="">{$Think.lang.loginsetup}</th>
              <th style="">{$Think.lang.isActive}</th>
              <th style="">{$Think.lang.operating}</th>
            </tr>
          </thead>
          <tbody>
            <volist name="list" id="vo">
              <tr <if condition="$vo.uid neq $no_auth_userid">data-id="{$vo['uid']}"</if> >
                <td>
                  <if condition="$vo.uid neq $no_auth_userid"><input type="checkbox" class="toggle" /></if>
                </td>
                <td>{$vo['uid']}</td>
                <td>{$vo['uname']}</td>
                <td>{$vo['email']}</td>
                <td>{$vo['phone']}</td>
                <td>{$vo['group_name']}</a>
                 <td><eq name="vo['admin_level']" value="0">普通用户</eq></a>
                     <eq name="vo['admin_level']" value="1">管理员</eq></a>
                     <eq name="vo['admin_level']" value="2">企业用户</eq></a>
                </td>
                <td>{$vo['ctime'] | date="Y-m-d H:i:s",###}</td>
                <td>{$vo['devicetype']}</td>
                <td>
                  <eq name="vo['is_active']" value="1">{$Think.lang.active}
                    <else />{$Think.lang.notActive}</eq>
                </td>
                <td><a href="{:URL('admin/UserFriends/userfriends',array('userid'=>$vo['uid']))}"  >好友</a>|
                    <a href="{:URL('admin/Footprint/footprint',array('userid'=>$vo['uid']))}"  >足迹</a>
                  | <a href="javascript:;" onclick="javascript:window.location.href='{:URL('admin/User/addUser','id='.$vo['uid'].'')}'">{$Think.lang.editor}</a>
                 <if condition="$vo.uid neq $no_auth_userid"> 
                 | 
                   <eq name="user_tab" value="cur">
                    <a href="javascript:;" class="A_del">屏蔽</a>
                  </eq>
                  <eq name="recycle_tab" value="cur">
                    <a href="javascript:;" class="A_recover">恢复</a>
                  </eq>
                </td>
              </tr>
            </volist>
          </tbody>
        </table>
      </div>
      <div class="datas-ft">
        <div class="actions">
          <eq name="user_tab" value="cur">
          <a href="{:URL('admin/User/addUser')}" class="btn">{$Think.lang.addUser}</a>
          <a href="javascript:;" class="btn" id="J_transfer">{$Think.lang.shiftUserManageGroup}</a>
          <a href="javascript:;" class="btn" id="J_del">{$Think.lang.delUser}</a>
          </eq>
          <eq name="recycle_tab" value="cur">
            <a href="javascript:;" class="btn" id="J_restore">恢复用户</a>
            <a href="javascript:;" class="btn" id="J_delete">永久删除</a>
          </eq>
          
        </div>
        <div class="pager">{$page}</div>
      </div>
    </div>
  </div>
  </div>
</body>

</html>
